﻿

namespace Godot.core
{
    public partial class Image
    {
        private const int __MAX_WIDTH = 4096;
        private const int __MAX_HEIGHT = 4096;

        public enum Format
        {
            FORMAT_GRAYSCALE, ///< one byte per pixel, 0-255 
            FORMAT_INTENSITY, ///< one byte per pixel, 0-255 
            FORMAT_GRAYSCALE_ALPHA, ///< two bytes per pixel, 0-255. alpha 0-255 
            FORMAT_RGB, ///< one byte R, one byte G, one byte B 
            FORMAT_RGBA, ///< one byte R, one byte G, one byte B, one byte A 
            FORMAT_INDEXED, ///< index byte 0-256, and after image end, 256*3 bytes of palette 
            FORMAT_INDEXED_ALPHA, ///< index byte 0-256, and after image end, 256*4 bytes of palette (alpha)
            FORMAT_YUV_422,
            FORMAT_YUV_444,
            FORMAT_BC1, // DXT1
            FORMAT_BC2, // DXT3
            FORMAT_BC3, // DXT5
            FORMAT_BC4, // ATI1
            FORMAT_BC5, // ATI2
            FORMAT_PVRTC2,
            FORMAT_PVRTC2_ALPHA,
            FORMAT_PVRTC4,
            FORMAT_PVRTC4_ALPHA,
            FORMAT_ETC, // regular ETC, no transparency
            FORMAT_ATC,
            FORMAT_ATC_ALPHA_EXPLICIT,
            FORMAT_ATC_ALPHA_INTERPOLATED,
            /*FORMAT_ETC2_R, for the future..
            FORMAT_ETC2_RG,
            FORMAT_ETC2_RGB,
            FORMAT_ETC2_RGBA1,
            FORMAT_ETC2_RGBA,*/
            FORMAT_CUSTOM,

            FORMAT_MAX
        }

        public enum Interpolation
        {
            INTERPOLATE_NEAREST,
            INTERPOLATE_BILINEAR,
            /* INTERPOLATE GAUSS */
        }

        private int __width;
        private int __height;
        private int __mipmaps;
        private int w;
        private int h;
        private int mipmaps;
        private Format imgformat;
        private byte[] pixels;

        public Image(int w, int h, int mipmaps, Format imgformat, byte[] pixels)
        {
            // TODO: Complete member initialization
            this.w = w;
            this.h = h;
            this.mipmaps = mipmaps;
            this.imgformat = imgformat;
            this.pixels = pixels;
        }

        public Image()
        {
            // TODO: Complete member initialization
        }
    }

    public partial class Image
    {
        public int get_width()
        {
            return __width; 
        }

        public int get_height()
        {
            return __height;
        }

        public int get_mipmaps()
        {
            return __mipmaps;
        }
    }
}
